package com.aynu.stroke.handler.valuation;

public class BasicValuation implements Valuation {
    private Valuation valuation;

    public BasicValuation(Valuation valuation){
        this.valuation = valuation;
    }

    @Override
    public float calculation(float km) {
        if (km <= 3) {
            return 0f; // 起步价
        }

        return (km - 3) * 2.3f; // 起步价 + 超出部分的每公里费用
    }
}
